package com.decheng.service.impl;

import com.decheng.dao.PaymentDao;
import com.decheng.entities.Payment;
import com.decheng.service.PaymentService;
import org.springframework.stereotype.Service;

/**
 * @Author 孔德成
 * @Slogan 致敬大师，致敬未来的你
 * @date 2021/8/18
 */
@Service
public class PaymentServiceImpl implements PaymentService {

    PaymentDao paymentDao;

    public PaymentServiceImpl(PaymentDao paymentDao) {
        this.paymentDao = paymentDao;
    }

    @Override
    public int create(Payment payment) {
        return paymentDao.create(payment);
    }

    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.getPaymentById(id);
    }
}
